/**
 * 
 */
package cn.com.xf.web;

import cn.com.xf.web.form.BaseForm;

/**
 * @author Administrator
 * 
 */
public class PageModel {
	public final static int DEFAULT_PAGE_SIZE = 15;
	public final static int DEFAULT_PAGE_SIZE_AREA = 20;
	public final static int DEFAULT_PAGE_SIZE_WIKI_SEARCH = 20;
	private int pageSize;
	private int pageCount;
	private int rowCount;
	private int begin;

	public PageModel(int count, int pageSize, int pageNum, BaseForm form) {
		int begin = ((pageNum - 1) * pageSize);
		this.setBegin(begin);
		this.setPageSize(pageSize);
		form.setTotalRecord(count + "");
		form.setPageSize(pageSize + "");
		form.setPageNum(pageNum + "");
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getPageCount() {
		return pageCount;
	}

	public void setPageCount(int pageCount) {
		this.pageCount = pageCount;
	}

	public int getRowCount() {
		return rowCount;
	}

	public void setRowCount(int rowCount) {
		this.rowCount = rowCount;
	}

	public void setBegin(int begin) {
		this.begin = begin;
	}

	public int getBegin() {
		return begin;
	}

}
